package com.workshop.web;

import java.util.Map;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import com.workshop.entity.UUser;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.workshop.service.IAArticleService;
import com.workshop.utils.check.CheckUtil;

@RequestMapping("/note")
@RestController
public class NoteController {
	
	@Resource
	private IAArticleService articleService;
	
	@PostMapping("/list")
	public Map<String,Object> list(HttpServletRequest request,Long pageStart, Long pageTotal) throws Exception{
		UUser user = (UUser) CheckUtil.checkOline(request);
		return articleService.noteList(pageStart,pageTotal,user);
	}
}
